﻿using System.ComponentModel.DataAnnotations;

namespace LinqToSqlDemo;

public class Product
{
    [Key] public int ProductId { get; set; }

    [Required] //不能为空
    [MaxLength(50)] //限制长度
    public string? Name { get; set; }

    public string? Description { get; set; }

    [Required] //价格
    public decimal Price { get; set; }

    public int StockQuantity { get; set; }
}